/*
let passCode = 'secret1 correct';

class Employee {
    private _fullName: string

    // tsc demo.ts --target es5
    get FullName(): string {
        return this._fullName
    }

    set FullName(newName: string) {
        if (passCode && passCode === 'secret correct') {
            this._fullName = newName
        } else {
            console.log('Error:报错!')

        }
    }

}

let employee = new Employee();
employee.FullName = 'fork';
if (employee.FullName) {
    console.log(employee.FullName)
}*/
//用LengthWise约束范型，
function logger(val) {
    console.log(val.length);
}
// logger<string>('d');
logger({ length: 2 });
